
<?php Util::tsRegisterAssetJs('reports.js'); ?>

<?php
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'type' => 'horizontal',
    'id' => 'reporteValoresNutricionales',
        ));
?>

<?php
$colors = ['#EBAB17', '#FF9655', '#48DB6B', '#FFB0F2', '#373CDB', '#24CBE5', '#FF9655', '#FFF263', '#6AF9C4'];
?>


<div class="row-fluid sortable span12">

    <div class="box">
        <div class="box-header well" data-original-title> 
            <center>
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'type' => 'warning',
                    'icon' => 'icon-file',
                    'label' => Yii::t('AweCrud.app', 'Exportar todas las gráficas (imagen)'),
                    'htmlOptions' => array('onclick' => 'js:Highcharts.exportCharts([chart1,chart2,chart3,chart4,chart5])'),
                ));
                ?>
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'type' => 'success',
                    'icon' => 'print',
                    'id' => 'btnImprimirGraficas',
                    'label' => Yii::t('AweCrud.app', 'Imprimir  todas las gráficas'),
                    'htmlOptions' => array('onclick' => 'js:printCharts([chart1,chart2,chart3,chart4,chart5])'),
                ));
                ?>
            </center>
        </div>

        <div class="tabtable">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab1" data-toggle="tab">Lunes </a></li>
                <li><a href="#tab2" data-toggle="tab">Martes</a></li>
                <li><a href="#tab3" data-toggle="tab">Miércoles</a></li>
                <li><a href="#tab4" data-toggle="tab">Jueves</a></li>
                <li><a href="#tab5" data-toggle="tab">Viernes</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="tab1">
                    <?php $this->renderPartial('reports/_reporte', array('reporte' => $reportes[0], 'color' => $colors[0], 'nombreChart' => 'chart1', "model" => $model)) ?>
                </div>
                <div class="tab-pane" id="tab2">
                    <?php $this->renderPartial('reports/_reporte', array('reporte' => $reportes[1], 'color' => $colors[1], 'nombreChart' => 'chart2', "model" => $model)) ?>
                </div>
                <div class="tab-pane" id="tab3">
                    <?php $this->renderPartial('reports/_reporte', array('reporte' => $reportes[2], 'color' => $colors[2], 'nombreChart' => 'chart3', "model" => $model)) ?>
                </div>
                <div class="tab-pane" id="tab4">
                    <?php $this->renderPartial('reports/_reporte', array('reporte' => $reportes[3], 'color' => $colors[5], 'nombreChart' => 'chart4', "model" => $model)) ?>
                </div>
                <div class="tab-pane" id="tab5">
                    <?php $this->renderPartial('reports/_reporte', array('reporte' => $reportes[4], 'color' => $colors[4], 'nombreChart' => 'chart5', "model" => $model)) ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>
<center>
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
        'label' => Yii::t('AweCrud.app', 'Regresar'),
        'url' => '../infoCartaSemanal/admin',
    ));
    ?>
</center>